package com.yt.sys.server;

import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Import;
import springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper;

@SpringBootApplication
@EnableDubbo
@ComponentScan(basePackages = {"com.yt"})
@Import(DocumentationPluginsBootstrapper.class)
@MapperScan("com.yt.sys.server.mapper")
public class SysApplication {

    public static void main(String[] args) {
        // 解决 Microsoft JDK extnet 错误
        System.setProperty("jdk.net.ext.check", "false");
        System.setProperty("jdk.net.usePlainSocketServer", "true");
        
        System.setProperty("dubbo.application.metadata-type", "none");
        System.setProperty("dubbo.metadata-report.protocol", "none");
        SpringApplication.run(SysApplication.class, args);
    }
}